package maze.utils;

import java.awt.Image;
import java.awt.Toolkit;
import java.net.URL;

public class ResourceLoader {
	public static Image loadImage(String path) {
		URL url = ResourceLoader.class.getClassLoader().getResource(path);
		return url == null ? Toolkit.getDefaultToolkit().getImage(path)
				: Toolkit.getDefaultToolkit().getImage(url);
	}
}
